{# The player (static/js/timeline.js), for any page that plays something: ``player(steps)`` wraps what it lights (``{% call %}``) with its steps and its controls; each step lights CSS selectors inside it, and the latest to start says what it is under them. Played in scenes (``[data-play-scene]`` inside it), ``chapters`` (each its ``key`` and ``title``) go to each, where there are two or more. #} {% from "components/macros/form.html" import action %} {% from "components/macros/icons.html" import icon %} {# The speeds offered, fastest first: real time, and slowed so a few milliseconds show. The player starts at one of these (timeline.js). #} {% set SPEEDS = ((1, "Real time"), (0.2, "5x slower"), (0.1, "10x slower"), (0.02, "50x slower"), (0.01, "100x slower"), (0.001, "1000x slower")) %} {# ``relative``: its controls' screen-reader labels (``sr-only``, absolute) place within it, not against the page from inside a scrolling thread. #} {% macro player(steps, label="Replay", chapters=()) %}
{% if chapters|length > 1 %}{% endif %}

{{ caller() }}
{% endmacro %} {# A replay's levels on the player (``overseer_replay.replay``): each scene its map, drawn once and inert, the first shown. The Replay page and a path card in a reply both play through this. #} {% macro stage(steps, scenes) %} {% call player(steps, chapters=scenes) %} {% for scene in scenes %}
{{ scene.map }}
{% endfor %} {% endcall %} {% endmacro %}